home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / Source / GNU / uucp / Uucp.framework / unix.subproj / basnam.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-09  |  349 b   |  23 lines

  1. /* basnam.c
  2.    Get the base name of a file.  */
  3.  
  4. #include "uucp.h"
  5.  
  6. #include "uudefs.h"
  7. #include "sysdep.h"
  8. #include "system.h"
  9.  
  10. /* Get the base name of a file name.  */
  11.  
  12. char *
  13. zsysdep_base_name (zfile)
  14.      const char *zfile;
  15. {
  16.   const char *z;
  17.  
  18.   z = strrchr (zfile, '/');
  19.   if (z != NULL)
  20.     return zbufcpy (z + 1);
  21.   return zbufcpy (zfile);
  22. }
  23.